home *** CD-ROM | disk | FTP | other *** search
- Path: bln.sel.alcatel.de!news
- From: 1570sw <1570sw@setsk0.rpi.ses.alcatel.es>
- Newsgroups: comp.lang.c++
- Subject: Re: Help Needed On Using Scroll Bars
- Date: Thu, 01 Feb 1996 12:14:55 -0800
- Organization: Alcatel SEL AG Berlin
- Message-ID: <31111F3F.2BDD@setsk0.rpi.ses.alcatel.es>
- References: <310FC02B.4C1C@geis.geis.com>
- NNTP-Posting-Host: setxa2.rpi.ses.alcatel.es
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0b5 (Win16; I)
-
- westley wrote:
- >
- > Hello,
- >
- > (Borland 4.0)
- > I wish to use a Scroll Bar with my Pop-up Dialog Box.
- > The resource workshop creates one easy enough. The problem
- > is that the help and documetation leave you a little short
- > about how to communicate with it. There is doc on using
- > the TScrollbar class but nothing dealing with using
- > the Scrollbar created with the WS_VSROLLBAR attribute set
- > for a DLG.
- >
- > Westley L. Hespeth
- > Westley@geis.geis.com
- > Speth Software
-
-
- You maigth use transfer buffers to communicate with objects in dialog
- boxes in general. This is a littel tricky, but easy when you know who
- to do it. I suggest you to follow the next steps:
-
- 1.- Create a transfer structure for every dialog box you want to
- communicate with; for example:
-
- typedef struct {
-
- ...
- scrollbartransfertype scroll
- ...
-
- } T_TransferType;
-
- I'm sorry, but I don't remember at this moment the type for transfering
- data from a scroll bar, but you can consult the manual in the chapter
- on dialog boxes.
-
- 2.- Create a class, derived from TDialogBox, for every dialog box you
- want to handle, in which constructor you have to put:
-
- TMyDialogBox::TMyDialogBox (Twindow* parent, T_TransferType& tr_type)
- :TDialogBox(parent)
- {
-
- ...
- new TScrollBar(SCROLL_ID);
- ....
- TransferBuffer = &tr_type;
-
- }
-
- Where SCROLL_ID is the identifier for your scroll bar you have defined
- with the resource workshop.
-
- 3.- In your parent window, you have to do the next:
-
- T_TransferType t_type;
-
- ...
-
- // Initilize the varibles in t_type to the values you want to
- // appear by default in your dialog when created.
-
- new TMyDialogBox(this, t_type);
-
- // To read the values introduced in the box:
- x = t_type.x
- ...
-
- Where x is the variable you want to store the values returned.
-
- I hope this will help you; anyhow, if you need more information I could
- provide you with some examples.
-
- heras@setsk0.rpi.ses.alcatel.es
-